﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace bds_03
{
    class Program
    {
        static void Main(string[] args)
        {
            Person p1 = new Person(22, "Bill");
            p1.Print();
            Person p2 = p1;
            p2.Print();
            p1.Name = "Gates";
            p1.Print();
            p2.Print();
        }
    }
    class Person
    {
        public int Age { get; set; }
        public string Name { get; set; }

        public Person(int age, string name)
        {
            Age = age;
            Name = name;
        }
        public void Print()
        {
            Console.WriteLine("Person {0} of age {1}", Name, Age);
        }
    }
}
